<extend name="./Application/Admin/View/Public/base.html" />
<block name="eosi-css">
    <link href="__PUBLIC__/assets/css/daterangepicker.css" rel="stylesheet">
</block>
<block name="eosi-js"> <script
    src="__PUBLIC__/assets/js/date-time/bootstrap-datepicker.min.js"></script>
    <script src="__PUBLIC__/assets/js/jqGrid/jquery.jqGrid.min.js"></script>
    <script src="__PUBLIC__/assets/js/jqGrid/i18n/grid.locale-en.js"></script>
    <script type="text/javascript">
        var $path_base = "/";//this will be used in gritter alerts containing images
    </script>
</block>
<block name="page-content">
    <div class="row">
        <div class="col-xs-12">
            <div class="row-fluid">
                <div class="span12">
                    <div class="widget-box">
                        <div class="widget-header header-color-blue">
                            <h5 class="lighter">
                                编辑用户组
                            </h5>
                        </div>
                        <div class="widget-body">
                            <div class="widget-main no-padding">
                                <form class="form-horizontal"  name="saveForm" id="saveForm"  method="post"  action="{:U('updateGroup')}">
                                    <input type="hidden" name="id" value="{$data.id}">
                                    <table class="table table-striped table-bordered table-hover">
                                        <tbody>
                                            <tr>
                                                <td class="no-padding-right" width="15%">
                                                    <label class="control-label"><small>用户组中文名称</small></label>
                                                </td>
                                                <td>
                                                    <input type="text" id="title" name="title" value="{$data.title}" class="col-xs-10 col-sm-4" />
                                                    <span class="help-inline">
                                                        &nbsp;
                                                        <span class="middle control-label red">&nbsp;&nbsp;如：默认用户组</span>
                                                    </span>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>

                                    <table class="table table-striped table-bordered table-hover" id="answer">
                                        <tbody>
                                            <tr>
                                                <td class="no-padding-right" width="15%">

                                                </td>
                                                <td>
                                                    <button class="btn btn-success" type="button" onclick="checkSubmit();">
                                                        <i class="icon-ok bigger-110"></i>
                                                        提交
                                                    </button>
                                                    <button class="btn btn-warning" type="button" onclick="returnButton({});">
                                                        <i class="icon-undo bigger-110"></i>
                                                        返回
                                                    </button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div><!-- /.row -->

    <script type="text/javascript">
        jQuery(function ($) {
            //提交Form
            checkSubmit = function () {
                var title = $("#title").val();
                if (title == '') {
                    art.dialog.alert("用户组中文名称不能为空");
                    return false;
                }
                $("form[name=saveForm]").submit();
            }

            returnButton = function () {
                location.href = "__CONTROLLER__/group";
            }
        });
    </script>
</block>